/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "news_comment")
//@NamedQueries({@NamedQuery(name = "NewsComment.findAll", query = "SELECT n FROM NewsComment n"), @NamedQuery(name = "NewsComment.findById", query = "SELECT n FROM NewsComment n WHERE n.id = :id"), @NamedQuery(name = "NewsComment.findByClientid", query = "SELECT n FROM NewsComment n WHERE n.clientid = :clientid"), @NamedQuery(name = "NewsComment.findByCommenttext", query = "SELECT n FROM NewsComment n WHERE n.commenttext = :commenttext"), @NamedQuery(name = "NewsComment.findByName", query = "SELECT n FROM NewsComment n WHERE n.name = :name"), @NamedQuery(name = "NewsComment.findByCommenttime", query = "SELECT n FROM NewsComment n WHERE n.commenttime = :commenttime"), @NamedQuery(name = "NewsComment.findByIsgood", query = "SELECT n FROM NewsComment n WHERE n.isgood = :isgood"), @NamedQuery(name = "NewsComment.findByIsdelete", query = "SELECT n FROM NewsComment n WHERE n.isdelete = :isdelete"), @NamedQuery(name = "NewsComment.findByDeleter", query = "SELECT n FROM NewsComment n WHERE n.deleter = :deleter"), @NamedQuery(name = "NewsComment.findByDeletetime", query = "SELECT n FROM NewsComment n WHERE n.deletetime = :deletetime")})
public class NewsComment implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "clientid")
    private String clientid;
    @Column(name = "commenttext")
    private String commenttext;
    @Column(name = "name")
    private String name;
    @Column(name = "commenttime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date commenttime;
    @Column(name = "isgood")
    private Integer isgood;
    @Column(name = "isdelete")
    private Integer isdelete;
    @Column(name = "deleter")
    private String deleter;
    @Column(name = "deletetime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date deletetime;
    @JoinColumns({@JoinColumn(name = "cid", referencedColumnName = "cid"), @JoinColumn(name = "channleid", referencedColumnName = "channleid")})
    @ManyToOne
    private NewsExtendsChannelTitle newsExtendsChannelTitle;

    public NewsComment() {
    }

    public NewsComment(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getClientid() {
        return clientid;
    }

    public void setClientid(String clientid) {
        this.clientid = clientid;
    }

    public String getCommenttext() {
        return commenttext;
    }

    public void setCommenttext(String commenttext) {
        this.commenttext = commenttext;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCommenttime() {
        return commenttime;
    }

    public void setCommenttime(Date commenttime) {
        this.commenttime = commenttime;
    }

    public Integer getIsgood() {
        return isgood;
    }

    public void setIsgood(Integer isgood) {
        this.isgood = isgood;
    }

    public Integer getIsdelete() {
        return isdelete;
    }

    public void setIsdelete(Integer isdelete) {
        this.isdelete = isdelete;
    }

    public String getDeleter() {
        return deleter;
    }

    public void setDeleter(String deleter) {
        this.deleter = deleter;
    }

    public Date getDeletetime() {
        return deletetime;
    }

    public void setDeletetime(Date deletetime) {
        this.deletetime = deletetime;
    }

    public NewsExtendsChannelTitle getNewsExtendsChannelTitle() {
        return newsExtendsChannelTitle;
    }

    public void setNewsExtendsChannelTitle(NewsExtendsChannelTitle newsExtendsChannelTitle) {
        this.newsExtendsChannelTitle = newsExtendsChannelTitle;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsComment)) {
            return false;
        }
        NewsComment other = (NewsComment) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsComment[id=" + id + "]";
    }

}
